import request from '@/utils/request'

// 查询企业的部门列表
export const getDepartments = () => request.get('/company/department')

// 删除组织架构
export const delDepartments = (id) => request.delete(`/company/department/${id}`)

// 新增部门
export const addDepartments = (obj) => request.post('/company/department', obj)

// 根据id查询部门详情
export const getDepartmentDetail = (id) => request.get(`/company/department/${id}`)

// 编辑部门
export const updateDepartments = (data) => request.put(`/company/department/${data.id}`, data)

